#include <stdio.h>  // FILE

void pgi_log(const char* fmt, ...);

typedef int (*pgi_dispatch_func_t)(
    void* app_ctx,
    const char* route,
    const char* in_data, size_t in_length,
    char** out_data, size_t* out_length);

int pgi_serve_files(
    pgi_dispatch_func_t dispatch_func,
    void* app_ctx,
    FILE* infile, FILE *outfile);

int pgi_serve(pgi_dispatch_func_t dispatch_func, void* app_ctx);
